<?php


namespace app\widgets\gallery;


class GalleryWidget extends \yii\base\Widget
{
    public $gallery = [];

    public function run()
    {

        $asset = GalleryAsset::register($this->getView());

        $tpl = ' <div class="interior-grids"> ';
        foreach ($this->gallery as $item) {
            $tpl .= '<div class="col-md-4 interior-grid"> <h3>' . $item['title'] . '</h3>';
//            $tpl .= '<img src="' . $asset->baseUrl . '/pic.png" />';
            $tpl .= '<div class="gallery"> <a href="images/pic1.jpg"><img src="' . $item['img'] . '" class="img-responsive" alt="/" title="image-name"></a>
        </div> <p>' . $item['content'] . '</p>
        <div class="plus_btn"> <a href="' . $item['link'] . '"><span></span></a> </div>
    </div>';
        }
        $tpl .= '<div class="clearfix"></div> </div>';


        return $tpl;
    }
}